<?php
$id=$_GET['id'];
$username=$_GET['username'];
$password=$_GET['password'];
$age=$_GET['age'];

include '../connect.php';


//INSERT INTO `bbs` (`id`, `username`, `password`, `age`) VALUES ('9', '孙悟空', '789', '21');


$sql ="INSERT INTO `bbs` (`id`, `username`, `password`, `age`) VALUES ('$id', '$username', '$password', '$age');";
$boolean = mysqli_query($link,$sql);

if($boolean && mysqli_affected_rows($link)){
    echo '添加成功<a href="../index.php">返回首页</a>';
} else{
    echo'添加失败<a href="../index.php">返回首页</a>';
}


mysqli_close($link);

